<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Global Image - Editar Funcion&aacute;rio</title>
            <link rel="stylesheet" type="text/css" href="/globalimage2/faces/jsfcrud.css" /><%@ include file="/WEB-INF/jspf/AjaxScripts.jspf" %><script type="text/javascript" src="/globalimage2/faces/jsfcrud.js"></script>
        </head>
        <body>
            <%@include file="../../WEB-INF/jspf/header/head.jspf"%>
            <div style="float:left">
                <%@include file="../../WEB-INF/jspf/header/menuDinamico.jspf"%>
            </div>
            <div id="div_content">
                <div class="bgContentTable">
                    <div class="titleTable">
                        <h3>Editar Funcion&aacute;rio
                        </h3>
                    </div>
                    <br/>
                    <h:form>

                        &nbsp;&nbsp;

                        <h:commandLink action="#{funcionario.edit}" value="Salvar">
                            <f:param name="jsfcrud.currentFuncionario" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][funcionario.funcionario][funcionario.converter].jsfcrud_invoke}"/>
                        </h:commandLink>
                        
                        <h:outputText value=" | "/>
                        <h:commandLink value="Remover" action="#{funcionario.destroy}">
                            <f:param name="jsfcrud.currentFuncionario" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][funcionario.funcionario][funcionario.converter].jsfcrud_invoke}"/>
                        </h:commandLink>
                        
                        <h:outputText value=" | "/>
                        <h:commandLink action="#{funcionario.listSetup}" value="Exibir todos" immediate="true"/>
                        <h:outputText value=" | "/>

                        <h:panelGroup id="messagePanel" layout="block">
                            <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                        </h:panelGroup>
                        <br />
                        
                        <h:panelGrid columns="2" style="margin-left:10px;">

                            <h:outputText value="Nome:"/>
                            <h:outputText value="#{funcionario.funcionario.usuarioId.nome}" />

                            <h:outputText value="Data Admissão:"/>
                            <h:panelGrid columns="3">
                                <h:selectOneMenu id="diaAdmissao" value="#{funcionario.funcionarioDiaAdmissao}">
                                    <f:selectItems value="#{utilController.arrayDias}"/>
                                </h:selectOneMenu>
                                <h:selectOneMenu id="mesAdmissao" value="#{funcionario.funcionarioMesAdmissao}">
                                    <f:selectItems value="#{utilController.arrayMeses}"/>
                                </h:selectOneMenu>
                                <h:selectOneMenu id="anoAdmissao" value="#{funcionario.funcionarioAnoAdmissao}">
                                    <f:selectItems value="#{utilController.arrayAnos}"/>
                                </h:selectOneMenu>
                            </h:panelGrid>
                            <h:outputText value="Data de nascimento:"/>
                            <h:panelGrid columns="3">
                                <h:selectOneMenu id="diaNasc" value="#{funcionario.funcionarioDiaNascimento}">
                                    <f:selectItems value="#{utilController.arrayDias}"/>
                                </h:selectOneMenu>
                                <h:selectOneMenu id="mesNasc" value="#{funcionario.funcionarioMesNascimento}">
                                    <f:selectItems value="#{utilController.arrayMeses}"/>
                                </h:selectOneMenu>
                                <h:selectOneMenu id="anoNasc" value="#{funcionario.funcionarioAnoNascimento}">
                                    <f:selectItems value="#{utilController.arrayAnos}"/>
                                </h:selectOneMenu>
                            </h:panelGrid>
                            <h:outputText value="Cbo:"/>
                            <h:inputText id="cbo" maxlength="20" size="20" value="#{funcionario.funcionario.cbo}" title="Cbo" required="true" requiredMessage="The cbo field is required." />
                            <h:outputText value="Ctps:"/>
                            <h:inputText id="ctps" maxlength="20" size="20" value="#{funcionario.funcionario.ctps}" title="Ctps" required="true" requiredMessage="The ctps field is required." />
                            <h:outputText value="Série:"/>
                            <h:inputText id="serie" maxlength="20" size="20" value="#{funcionario.funcionario.serie}" title="Serie" required="true" requiredMessage="The serie field is required." />
                            <h:outputText value="CPF:"/>
                            <h:inputText id="cpf" maxlength="14" size="14" value="#{funcionario.funcionario.cpf}" title="Cpf" required="true" requiredMessage="The cpf field is required." />
                            <h:outputText value="RG:"/>
                            <h:inputText id="rg" maxlength="11" size="11" value="#{funcionario.funcionario.rg}" title="Rg" required="true" requiredMessage="The rg field is required." />
                            <h:outputText value="Orgao de expedição:"/>
                            <h:inputText id="orgaoExpedicao" maxlength="10" size="10" value="#{funcionario.funcionario.orgaoExpedicao}" title="OrgaoExpedicao" required="true" requiredMessage="The orgaoExpedicao field is required." />
                            <h:outputText value="Deficiente:"/>
                            <h:selectBooleanCheckbox id="deficiente" value="#{funcionario.funcionario.deficiente}" title="Deficiente" required="true" requiredMessage="The deficiente field is required." />
                            <h:outputText value="Número de dependentes:"/>
                            <h:selectOneMenu id="numeroDependente" value="#{funcionario.funcionario.numeroDependente}" title="NumeroDependente" required="true" requiredMessage="The numeroDependente field is required.">
                                <f:selectItems value="#{utilController.array_0_to_10}"/>
                            </h:selectOneMenu>
                            <h:outputText value="Mãe:"/>
                            <h:inputText id="mae" maxlength="150" value="#{funcionario.funcionario.mae}" title="Mae" required="true" requiredMessage="The mae field is required." />
                            <h:outputText value="Pai:"/>
                            <h:inputText id="pai" maxlength="150" value="#{funcionario.funcionario.pai}" title="Pai" required="true" requiredMessage="The pai field is required." />
                            <h:outputText value="Naturalidade:"/>
                            <h:inputText id="naturalidade" maxlength="100" value="#{funcionario.funcionario.naturalidade}" title="Naturalidade" required="true" requiredMessage="The naturalidade field is required." />
                            <h:outputText value="Nacionalidade:"/>
                            <h:inputText id="nacionalidade" maxlength="100" value="#{funcionario.funcionario.nacionalidade}" title="Nacionalidade" required="true" requiredMessage="The nacionalidade field is required." />
                        </h:panelGrid>
                    </h:form>
                </div>
            </div>
        </body>
    </html>
</f:view>
